<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png" />
    <button @click="handler">调用handler</button>
    <button @click="handlerFun">调用fun1</button>
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from "@/components/HelloWorld.vue";
import mixin from "../utils/mixin/mixin.js";

export default {
  name: "HomeView",
  components: {
    HelloWorld,
  },
  created() {
    console.log("这是自身的created");
  },
  methods: {
    handlerFun() {
      this.$fun1();
    },
  },

  mixins: [mixin],
  // beforeRouteEnter (to, from, next) {
  // next((vm)=>{
  //   vm.$store.state.xxx

  // })
  // }
};
</script>
